<?php
namespace app\index\model;

use think\Model;
use think\Db;
class Poscompanymodel extends Model{


    public function index($id){

        return $res = Db::table('rs_company')->where($id)->alias("i")->join("rs_pc_areas a","i.areaid=a.areaid","LEFT")->join('rs_study b','i.studyName=b.id','LEFT')
                    ->join('rs_fieldwroke c','i.fieldName=c.id','LEFT')->join('rs_wrokday d','i.wrokDay=d.id','LEFT')->find();
    }
    public function up($id,$data){
        return $res = Db::table('rs_company')->where('id',$id)->update($data);
    }

    public function int($id,$data){
        return $res = Db::table('rs_company')->where('id',$id)->update($data);
    }









}